package user;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import javax.persistence.CascadeType;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;


/**
 *
 * @author Thorsten Ludwig
 */
@Entity
public class UserCollection implements Serializable {
    
    @ElementCollection(fetch= FetchType.EAGER)
    @OneToMany(cascade= CascadeType.ALL)
    private Map<String, User> field;
    @Id
    @GeneratedValue
    private Long id;
    
    
    public UserCollection() {
        this.field = new HashMap<String, User>();
    }

    public Map<String, User> getField() {
        return field;
    }

    public void setField(Map<String, User> field) {
        this.field = field;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    
    
    
}
